<!DOCTYPE html>
<iframe></iframe>
<script>
var iframe = document.getElementsByTagName("iframe")[0];
var doc = iframe.contentDocument;
doc.open();
doc.write("<i>foo</i>");
doc.close();
</script>
